﻿using Core.DataAccess.Model.Project.Order;
using Core.Framework.Model.Common;
using Core.IBusiness.IOrderModule.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Web.Controllers
{
    /// <summary>
    /// 订单查询请求参数
    /// </summary>
    public class OrderListRequest
    {

        /// <summary>
        /// 订单状态
        /// </summary>
        public OrderStatus order_statu { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public OrderType order_type { get; set; }

        /// <summary>
        /// 每页显示条数
        /// </summary>
        public int rows { get; set; } = 20;

        /// <summary>
        /// 页名
        /// </summary>
        public int page { get; set; } = 1;

        /// <summary>
        /// 分页对象
        /// </summary>
        public Pagination pagination { get; set; }


        /// <summary>
        /// 兼容 Layui Table
        /// </summary>
        public void LayerTable()
        {
            this.pagination.rows = this.pagination.rows == 0 ? this.rows : this.pagination.rows;
            this.pagination.page = this.pagination.page == 0 ? this.page : this.pagination.page;
        }
    }
}
